/**
 * Test2.java
 * Overloaded main methods... Because we can...
 *
 * @author  John Thomason
 *    Date: Nov 9, 2008
 *  Course: CS222 Java Programming II
 * Seminar: 2
 *  Assign: n/a
 */

/**
 * Test2 Class
 * - Description
 */
public class Test2 {

  /**
   * Application Entry Point
   * @param args The command line arguments
   */
  public static void main(String[] joe) {

    prt("The main(String[] args) method\n");
    if( joe.length > 0 ){
      for( String s: joe ){
        prt(s);
      }//foreach
    }
    prt(); prt();

    Integer[] ints = {1,2,3,4,5,6,7,8,9,0};
    main(ints);     //Call to overloaded main(Integer[])
    
    Double[]  dubs = {1.2,2.3,3.4,4.5,5.6,6.7,8.9,9.0,0.1};
    main(dubs);     //Call to overloaded main(Double[])

  }//main()
  
  /**
   * Overloaded main()
   * @param args Array of Integers
   */
  public static void main(Integer[] bob){
    prt("The main(Integer[] args) method\n");
    if( bob.length > 0 ){
      for( Integer i: bob ){
        prt(i);
      }//foreach
    }
    prt(); prt();   
  }//main()
  
  /**
   * Overloaded main()
   * @param args Array of Doubles
   */
  public static void main(Double[] jim){

    prt("The main(Double[] args) method\n");
    if( jim.length > 0 ){
      for( Double d: jim ){
        prt(d);
      }//foreach
    }
    prt(); prt();
  }//main()
  
  /**
   * Overloaded prt methods
   */
  public static void prt(String s){
    System.out.printf("%s ", s);
  }//prt(String)

  public static void prt(Integer i){
    System.out.printf("%d ", i);
  }//prt(Integer)
  
  public static void prt(Double d){
    System.out.printf("%.2f ", d);
  }//prt(Double)
  
  public static void prt(){
    System.out.println();
  }//prt()
  
}//End Test2 Class
